package com.markchu.web.structure.controller;

import com.markchu.common.enums.StatusEnum;
import com.markchu.common.utils.CookieUtils;
import com.markchu.common.vo.MessageInfosVo;
import com.markchu.common.vo.ResultVo;
import com.markchu.component.redis.RedisCache;
import com.markchu.component.redis.utils.RedisHelper;
import com.markchu.modules.system.domain.*;
import com.markchu.modules.system.enums.FileTypeEnum;
import com.markchu.modules.system.service.*;
import com.markchu.modules.system.vo.UserVo;
import com.markchu.web.structure.vo.UserInfoVo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.ExampleMatcher;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.*;

@Controller
@RequestMapping("/home")
public class HomeController extends BaseController{

    @GetMapping("/index")
    public String index(Model model) {
        Long userId = getUserIdBy();
        model.addAttribute("userId",userId);
        return "/home/release/index";
    }

    @GetMapping("/release")
    public String release(Model model) {
        Long userId = getUserIdBy();
        model.addAttribute("userId", userId);
        return "/home/release/release";
    }
}
